package models

import (
	"gorm.io/gorm"
	"time"
)

type Likes struct {
	Id        uint64         `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	UserId    uint64         `gorm:"column:user_id;type:bigint UNSIGNED;comment:用户Id;not null;" json:"user_id"`   // 用户Id
	EssayId   uint64         `gorm:"column:essay_id;type:bigint UNSIGNED;comment:文章Id;not null;" json:"essay_id"` // 文章Id
	Live      uint64         `gorm:"column:live;type:bigint UNSIGNED;not null;" json:"live"`
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}
